home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #11
/
Amiga Plus CD - 2004 - No. 11.iso
/
AmiSoft
/
Dev
/
misc
/
temgen.lha
/
Temgen
/
tg-0.11
/
y.tab.c.precomp
< prev
next >
Wrap
Text File
|
2002-12-18
|
90KB
|
2,638 lines
/* A Bison parser, made from tg.y, by GNU bison 1.75. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Written by Richard Stallman by simplifying the original so called
``semantic'' parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#define YYBISON 1
/* Pure parsers. */
#define YYPURE 0
/* Using locations. */
#define YYLSP_NEEDED 0
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
TOK_NUM = 258,
TOK_FLOAT = 259,
TOK_NAME = 260,
TOK_STRING = 261,
TOK_CHAR = 262,
TOK_DOL = 263,
TOK_DIV = 264,
TOK_DOT = 265,
TOK_COM = 266,
TOK_STAR = 267,
TOK_PLUS = 268,
TOK_MINUS = 269,
TOK_PLUSPLUS = 270,
TOK_MINUSMINUS = 271,
TOK_PLUS_S = 272,
TOK_MINUS_S = 273,
TOK_DIV_S = 274,
TOK_MUL_S = 275,
TOK_CLOSE = 276,
TOK_CLOSEB = 277,
TOK_NL = 278,
TOK_OPEN = 279,
TOK_OPENB = 280,
TOK_COLON = 281,
TOK_SCOL = 282,
TOK_AT = 283,
TOK_EQ = 284,
TOK_IN = 285,
TOK_EQEQ = 286,
TOK_LT = 287,
TOK_NE = 288,
TOK_GT = 289,
TOK_NOT = 290,
TOK_AND = 291,
TOK_OR = 292,
TOK_LTEQ = 293,
TOK_GTEQ = 294,
TOK_IF = 295,
TOK_ELSE = 296,
TOK_ENDIF = 297,
TOK_EMBED = 298,
TOK_EMIT = 299,
TOK_OUTPUT = 300,
TOK_LOCAL = 301,
TOK_PUSH = 302,
TOK_POP = 303,
TOK_FUNCTION = 304,
TOK_ENDFUNCTION = 305,
TOK_SWITCH = 306,
TOK_CASE = 307,
TOK_FOR = 308,
TOK_ENDSWITCH = 309,
TOK_ENDFOR = 310,
TOK_RETURN = 311,
TOK_BREAK = 312,
TOK_USE = 313,
TOK_EXIT = 314
};
#endif
#define TOK_NUM 258
#define TOK_FLOAT 259
#define TOK_NAME 260
#define TOK_STRING 261
#define TOK_CHAR 262
#define TOK_DOL 263
#define TOK_DIV 264
#define TOK_DOT 265
#define TOK_COM 266
#define TOK_STAR 267
#define TOK_PLUS 268
#define TOK_MINUS 269
#define TOK_PLUSPLUS 270
#define TOK_MINUSMINUS 271
#define TOK_PLUS_S 272
#define TOK_MINUS_S 273
#define TOK_DIV_S 274
#define TOK_MUL_S 275
#define TOK_CLOSE 276
#define TOK_CLOSEB 277
#define TOK_NL 278
#define TOK_OPEN 279
#define TOK_OPENB 280
#define TOK_COLON 281
#define TOK_SCOL 282
#define TOK_AT 283
#define TOK_EQ 284
#define TOK_IN 285
#define TOK_EQEQ 286
#define TOK_LT 287
#define TOK_NE 288
#define TOK_GT 289
#define TOK_NOT 290
#define TOK_AND 291
#define TOK_OR 292
#define TOK_LTEQ 293
#define TOK_GTEQ 294
#define TOK_IF 295
#define TOK_ELSE 296
#define TOK_ENDIF 297
#define TOK_EMBED 298
#define TOK_EMIT 299
#define TOK_OUTPUT 300
#define TOK_LOCAL 301
#define TOK_PUSH 302
#define TOK_POP 303
#define TOK_FUNCTION 304
#define TOK_ENDFUNCTION 305
#define TOK_SWITCH 306
#define TOK_CASE 307
#define TOK_FOR 308
#define TOK_ENDSWITCH 309
#define TOK_ENDFOR 310
#define TOK_RETURN 311
#define TOK_BREAK 312
#define TOK_USE 313
#define TOK_EXIT 314
/* Copy the first part of user declarations. */
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
#ifndef YYSTYPE
#line 99 "tg.y"
typedef union {
struct int_rec {
int val;
int line;
int start, end;
} i;
struct float_rec {
float val;
int line;
int start, end;
} f;
struct char_rec {
char *val;
int line;
int start, end;
} s;
struct ptr_rec {
void *val;
int line;
int start, end;
} p;
struct line_rec {
int line;
struct command *cmd;
} l;
} yystype;
/* Line 193 of /usr/local/share/bison/yacc.c. */
#line 223 "y.tab.c"
# define YYSTYPE yystype
# define YYSTYPE_IS_TRIVIAL 1
#endif
#ifndef YYLTYPE
typedef struct yyltype
{
int first_line;
int first_column;
int last_line;
int last_column;
} yyltype;
# define YYLTYPE yyltype
# define YYLTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
#line 130 "tg.y"
#include "alloc.h"
#include "generator.h"
#include "util.h"
#include <stdio.h>
#define FL fflush(stdout);
#define dpr printf
#define P(s) {dpr(s);}
#undef YYDEBUG
#define YYDEBUG 1
#undef YYERROR_VERBOSE
#define YYERROR_VERBOSE 1
int yydebug = 0;
char *errmsg = "syntax error";
extern struct txttab *text_table;
extern struct lintab *line_table;
extern int curfilen;
extern int lineno;
#define ERR(msg) save_error(atom_name(curfilen), lineno, msg)
/* Line 213 of /usr/local/share/bison/yacc.c. */
#line 270 "y.tab.c"
#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# if YYSTACK_USE_ALLOCA
# define YYSTACK_ALLOC alloca
# else
# ifndef YYSTACK_USE_ALLOCA
# if defined (alloca) || defined (_ALLOCA_H)
# define YYSTACK_ALLOC alloca
# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
# if defined (__STDC__) || defined (__cplusplus)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
# define YYSTACK_ALLOC malloc
# define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
#if (! defined (yyoverflow) \
&& (! defined (__cplusplus) \
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
short yyss;
YYSTYPE yyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (short) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAX)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
register YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (0)
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
#endif
#if defined (__STDC__) || defined (__cplusplus)
typedef signed char yysigned_char;
#else
typedef short yysigned_char;
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 111
#define YYLAST 825
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 60
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 42
/* YYNRULES -- Number of rules. */
#define YYNRULES 163
/* YYNRULES -- Number of states. */
#define YYNSTATES 232
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 314
#define YYTRANSLATE(X) \
((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const unsigned char yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59
};
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
static const unsigned short yyprhs[] =
{
0, 0, 3, 4, 6, 9, 13, 15, 17, 19,
21, 23, 26, 29, 31, 33, 35, 37, 39, 41,
43, 45, 47, 49, 51, 53, 55, 57, 59, 61,
63, 65, 67, 69, 71, 73, 75, 77, 79, 81,
83, 85, 87, 89, 91, 93, 95, 97, 100, 105,
108, 110, 114, 118, 120, 122, 124, 126, 128, 130,
132, 134, 136, 138, 140, 142, 144, 146, 150, 152,
156, 160, 164, 168, 170, 174, 178, 182, 186, 188,
192, 196, 202, 206, 210, 213, 215, 217, 220, 223,
226, 229, 232, 235, 237, 239, 241, 245, 248, 250,
252, 257, 262, 266, 270, 271, 273, 275, 279, 281,
283, 285, 287, 289, 291, 293, 295, 297, 299, 301,
303, 305, 307, 309, 311, 314, 320, 329, 332, 335,
337, 345, 348, 349, 351, 353, 357, 363, 368, 370,
373, 379, 382, 388, 391, 399, 405, 408, 411, 414,
416, 418, 420, 421, 423, 425, 428, 431, 434, 437,
440, 443, 446, 448
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yysigned_char yyrhs[] =
{
61, 0, -1, -1, 63, -1, 61, 62, -1, 61,
62, 63, -1, 23, -1, 64, -1, 79, -1, 65,
-1, 66, -1, 64, 65, -1, 64, 66, -1, 3,
-1, 4, -1, 5, -1, 6, -1, 7, -1, 10,
-1, 26, -1, 27, -1, 11, -1, 29, -1, 32,
-1, 30, -1, 33, -1, 34, -1, 35, -1, 36,
-1, 37, -1, 31, -1, 38, -1, 39, -1, 12,
-1, 13, -1, 18, -1, 17, -1, 20, -1, 19,
-1, 14, -1, 15, -1, 16, -1, 9, -1, 24,
-1, 21, -1, 25, -1, 22, -1, 8, 67, -1,
8, 24, 69, 21, -1, 8, 1, -1, 76, -1,
67, 10, 76, -1, 67, 10, 1, -1, 31, -1,
29, -1, 32, -1, 34, -1, 33, -1, 38, -1,
39, -1, 20, -1, 19, -1, 17, -1, 18, -1,
37, -1, 36, -1, 70, -1, 69, 68, 70, -1,
71, -1, 70, 13, 71, -1, 70, 14, 71, -1,
70, 13, 1, -1, 70, 14, 1, -1, 75, -1,
71, 12, 75, -1, 71, 9, 75, -1, 71, 12,
1, -1, 71, 9, 1, -1, 69, -1, 72, 11,
69, -1, 5, 26, 69, -1, 73, 11, 5, 26,
69, -1, 25, 72, 22, -1, 25, 73, 22, -1,
25, 1, -1, 66, -1, 74, -1, 75, 15, -1,
15, 75, -1, 35, 75, -1, 14, 75, -1, 75,
16, -1, 16, 75, -1, 3, -1, 4, -1, 6,
-1, 24, 69, 21, -1, 24, 1, -1, 5, -1,
66, -1, 76, 24, 77, 21, -1, 76, 25, 69,
22, -1, 76, 24, 1, -1, 76, 25, 1, -1,
-1, 78, -1, 69, -1, 78, 11, 69, -1, 80,
-1, 82, -1, 85, -1, 88, -1, 95, -1, 96,
-1, 97, -1, 98, -1, 99, -1, 90, -1, 91,
-1, 92, -1, 93, -1, 100, -1, 101, -1, 28,
-1, 28, 1, -1, 40, 69, 23, 61, 42, -1,
40, 69, 23, 61, 41, 23, 61, 42, -1, 40,
1, -1, 61, 50, -1, 1, -1, 49, 5, 24,
83, 21, 23, 81, -1, 49, 1, -1, -1, 84,
-1, 5, -1, 84, 11, 5, -1, 51, 69, 23,
86, 54, -1, 51, 69, 23, 1, -1, 87, -1,
86, 87, -1, 52, 69, 26, 23, 61, -1, 52,
1, -1, 53, 89, 23, 61, 55, -1, 53, 1,
-1, 24, 94, 27, 94, 27, 94, 21, -1, 24,
66, 30, 69, 21, -1, 24, 1, -1, 56, 69,
-1, 56, 1, -1, 57, -1, 47, -1, 48, -1,
-1, 69, -1, 1, -1, 28, 69, -1, 43, 69,
-1, 44, 69, -1, 45, 69, -1, 46, 5, -1,
58, 5, -1, 58, 6, -1, 59, -1, 59, 69,
-1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const unsigned short yyrline[] =
{
0, 158, 158, 159, 160, 161, 164, 167, 170, 176,
180, 186, 191, 198, 199, 200, 201, 202, 203, 204,
205, 206, 207, 208, 209, 210, 211, 212, 213, 214,
215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
225, 227, 229, 230, 231, 232, 233, 236, 242, 248,
254, 260, 266, 272, 273, 274, 275, 276, 277, 278,
279, 280, 281, 282, 283, 284, 287, 288, 296, 297,
303, 309, 313, 319, 320, 326, 332, 335, 340, 345,
352, 358, 367, 373, 379, 385, 386, 387, 393, 399,
405, 411, 417, 423, 429, 435, 445, 451, 456, 466,
471, 477, 483, 486, 492, 493, 496, 502, 510, 511,
512, 513, 514, 515, 516, 517, 518, 519, 520, 521,
522, 523, 524, 525, 527, 533, 537, 541, 546, 547,
551, 562, 568, 569, 572, 576, 583, 588, 593, 596,
602, 606, 611, 615, 620, 624, 630, 635, 638, 643,
648, 653, 658, 659, 660, 665, 669, 673, 677, 681,
685, 687, 693, 696
};
#endif
#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "TOK_NUM", "TOK_FLOAT", "TOK_NAME",
"TOK_STRING", "TOK_CHAR", "TOK_DOL", "TOK_DIV", "TOK_DOT", "TOK_COM",
"TOK_STAR", "TOK_PLUS", "TOK_MINUS", "TOK_PLUSPLUS", "TOK_MINUSMINUS",
"TOK_PLUS_S", "TOK_MINUS_S", "TOK_DIV_S", "TOK_MUL_S", "TOK_CLOSE",
"TOK_CLOSEB", "TOK_NL", "TOK_OPEN", "TOK_OPENB", "TOK_COLON",
"TOK_SCOL", "TOK_AT", "TOK_EQ", "TOK_IN", "TOK_EQEQ", "TOK_LT",
"TOK_NE", "TOK_GT", "TOK_NOT", "TOK_AND", "TOK_OR", "TOK_LTEQ",
"TOK_GTEQ", "TOK_IF", "TOK_ELSE", "TOK_ENDIF", "TOK_EMBED", "TOK_EMIT",
"TOK_OUTPUT", "TOK_LOCAL", "TOK_PUSH", "TOK_POP", "TOK_FUNCTION",
"TOK_ENDFUNCTION", "TOK_SWITCH", "TOK_CASE", "TOK_FOR", "TOK_ENDSWITCH",
"TOK_ENDFOR", "TOK_RETURN", "TOK_BREAK", "TOK_USE", "TOK_EXIT",
"$accept", "lines", "eol", "cmd", "data_line", "other_token", "dol_exp",
"obj", "relop", "exp", "ear", "emul", "array", "record", "constructor",
"smp_exp", "objpart", "arglist", "arglist1", "ctl_cmd", "cmd_if",
"fun_body", "cmd_function", "param_list", "param_list1", "cmd_switch",
"case_list", "case_item", "cmd_for", "forctl", "cmd_return",
"cmd_break", "cmd_push", "cmd_pop", "optexp", "cmd_exp", "cmd_embed",
"cmd_emit", "cmd_output", "cmd_local", "cmd_use", "cmd_exit", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
static const unsigned short yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const unsigned char yyr1[] =
{
0, 60, 61, 61, 61, 61, 62, 63, 63, 64,
64, 64, 64, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
65, 65, 65, 65, 65, 65, 65, 66, 66, 66,
67, 67, 67, 68, 68, 68, 68, 68, 68, 68,
68, 68, 68, 68, 68, 68, 69, 69, 70, 70,
70, 70, 70, 71, 71, 71, 71, 71, 72, 72,
73, 73, 74, 74, 74, 75, 75, 75, 75, 75,
75, 75, 75, 75, 75, 75, 75, 75, 76, 76,
76, 76, 76, 76, 77, 77, 78, 78, 79, 79,
79, 79, 79, 79, 79, 79, 79, 79, 79, 79,
79, 79, 79, 79, 79, 80, 80, 80, 81, 81,
82, 82, 83, 83, 84, 84, 85, 85, 86, 86,
87, 87, 88, 88, 89, 89, 89, 90, 90, 91,
92, 93, 94, 94, 94, 95, 96, 97, 98, 99,
100, 100, 101, 101
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const unsigned char yyr2[] =
{
0, 2, 0, 1, 2, 3, 1, 1, 1, 1,
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 2, 4, 2,
1, 3, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 3, 1, 3,
3, 3, 3, 1, 3, 3, 3, 3, 1, 3,
3, 5, 3, 3, 2, 1, 1, 2, 2, 2,
2, 2, 2, 1, 1, 1, 3, 2, 1, 1,
4, 4, 3, 3, 0, 1, 1, 3, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 5, 8, 2, 2, 1,
7, 2, 0, 1, 1, 3, 5, 4, 1, 2,
5, 2, 5, 2, 7, 5, 2, 2, 2, 1,
1, 1, 0, 1, 1, 2, 2, 2, 2, 2,
2, 2, 1, 2
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const unsigned char yydefact[] =
{
2, 13, 14, 15, 16, 17, 0, 42, 18, 21,
33, 34, 39, 40, 41, 36, 35, 38, 37, 44,
46, 43, 45, 19, 20, 0, 22, 24, 30, 23,
25, 26, 27, 28, 29, 31, 32, 0, 0, 0,
0, 0, 150, 151, 0, 0, 0, 0, 149, 0,
162, 0, 3, 7, 9, 10, 8, 108, 109, 110,
111, 117, 118, 119, 120, 112, 113, 114, 115, 116,
121, 122, 49, 98, 0, 99, 47, 50, 124, 93,
94, 95, 0, 0, 0, 0, 0, 0, 85, 155,
66, 68, 86, 73, 127, 0, 156, 157, 158, 159,
131, 0, 0, 143, 0, 0, 148, 147, 160, 161,
163, 1, 6, 4, 11, 12, 0, 0, 0, 0,
90, 88, 92, 97, 0, 84, 0, 78, 0, 0,
89, 62, 63, 61, 60, 54, 53, 55, 57, 56,
65, 64, 58, 59, 0, 0, 0, 0, 0, 87,
91, 2, 132, 0, 146, 85, 153, 0, 2, 5,
48, 52, 51, 102, 106, 0, 105, 103, 0, 96,
0, 0, 82, 0, 83, 67, 71, 69, 72, 70,
77, 75, 76, 74, 0, 134, 0, 133, 137, 0,
0, 138, 0, 0, 0, 100, 0, 101, 80, 79,
0, 0, 125, 0, 0, 141, 0, 136, 139, 0,
154, 0, 142, 107, 0, 2, 0, 135, 0, 145,
0, 81, 0, 129, 0, 130, 2, 0, 126, 128,
140, 144
};
/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
-1, 51, 113, 52, 53, 54, 88, 76, 144, 156,
90, 91, 128, 129, 92, 93, 77, 165, 166, 56,
57, 225, 58, 186, 187, 59, 190, 191, 60, 105,
61, 62, 63, 64, 157, 65, 66, 67, 68, 69,
70, 71
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -176
static const short yypact[] =
{
281, -176, -176, -176, -176, -176, 46, -176, -176, -176,
-176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
-176, -176, -176, -176, -176, 83, -176, -176, -176, -176,
-176, -176, -176, -176, -176, -176, -176, 402, 616, 616,
616, 19, -176, -176, 59, 616, 10, 427, -176, 74,
616, 12, -176, 338, -176, -176, -176, -176, -176, -176,
-176, -176, -176, -176, -176, -176, -176, -176, -176, -176,
-176, -176, -176, -176, 616, -176, 23, 57, -176, -176,
-176, -176, 616, 616, 616, 452, 24, 616, -176, 786,
79, 64, -176, 85, -176, 625, 786, 786, 786, -176,
-176, -5, 648, -176, 128, 13, -176, 786, -176, -176,
786, -176, -176, 281, -176, -176, 671, 70, 163, 477,
85, 85, 85, -176, 694, -176, 17, 786, 9, 35,
85, -176, -176, -176, -176, -176, -176, -176, -176, -176,
-176, -176, -176, -176, 616, 502, 527, 552, 577, -176,
-176, 281, 47, 6, 45, 44, 786, 58, 281, -176,
-176, -176, 57, -176, 786, 67, 94, -176, 717, -176,
616, 616, -176, 91, -176, 79, -176, 64, -176, 64,
-176, 85, -176, 85, 14, -176, 69, 98, -176, 602,
11, -176, 616, 377, -13, -176, 616, -176, 786, 786,
84, 88, -176, 89, 109, -176, 740, -176, -176, 763,
-176, 92, -176, 786, 616, 281, 224, -176, 93, -176,
188, 786, -1, -176, -6, -176, 281, 99, -176, -176,
100, -176
};
/* YYPGOTO[NTERM-NUM]. */
static const short yypgoto[] =
{
-176, -149, -176, 2, -176, 68, 0, -176, -176, -24,
-22, -43, -176, -176, -176, -79, 22, -176, -176, -176,
-176, -176, -176, -176, -176, -176, -176, -64, -176, -176,
-176, -176, -176, -176, -175, -176, -176, -176, -176, -176,
-176, -176
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, parse error. */
#define YYTABLE_NINF -155
static const short yytable[] =
{
55, 89, 184, 120, 121, 122, 75, 188, 130, 194,
112, 103, 111, 95, 96, 97, 98, 112, 211, 152,
171, 102, 112, 107, 99, 125, 110, 79, 80, 126,
81, 172, 6, 117, 104, 112, 158, 112, 82, 83,
84, 228, 212, 170, 229, 227, 173, 72, 85, 86,
116, 73, 185, 115, 6, 201, 202, 174, 189, 87,
100, 124, 127, 189, 101, 207, 222, 224, 181, 183,
74, 161, -154, 147, 192, 73, 148, 230, 6, 108,
109, 118, 119, -123, 78, 193, 79, 80, 195, 81,
203, 6, 145, 146, 164, 168, 200, 82, 83, 84,
149, 150, 177, 179, 155, 196, -123, 85, 86, 204,
214, 215, 216, 55, 217, 159, 226, 75, 87, 220,
231, 114, 175, 112, -123, -123, 208, 0, 0, 154,
0, 79, 80, -123, 81, -123, 6, -123, -123, 162,
0, 0, 82, 83, 84, 0, 198, 199, 0, 0,
0, 55, 85, 86, 0, -152, 0, 0, 55, 0,
0, 0, 0, 87, 163, 206, 79, 80, 209, 81,
0, 6, 213, 0, 0, 0, 0, 82, 83, 84,
0, 0, 0, 0, -104, 0, 0, 85, 86, 210,
221, 79, 80, 0, 81, 0, 6, 0, 87, 0,
0, 0, 82, 83, 84, 0, 0, 0, 0, -152,
0, 0, 85, 86, 0, 55, 55, 0, 0, 0,
0, 0, 0, 87, 0, 223, 55, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, -2, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 0, 0, 38, 39, 40,
41, 42, 43, 44, -2, 45, 0, 46, 0, 0,
47, 48, 49, 50, 1, 2, 3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 0, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 0, 0, 38, 39, 40, 41, 42, 43,
44, 0, 45, 0, 46, 0, 0, 47, 48, 49,
50, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 0, 21, 22, 23, 24, 0, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 210, 0,
79, 80, 0, 81, 0, 6, 0, 0, 0, 0,
0, 82, 83, 84, 0, 0, 0, 0, 0, 0,
0, 85, 86, 94, -152, 79, 80, 0, 81, 0,
6, 0, 87, 0, 0, 0, 82, 83, 84, 0,
0, 0, 0, 0, 0, 0, 85, 86, 106, 0,
79, 80, 0, 81, 0, 6, 0, 87, 0, 0,
0, 82, 83, 84, 0, 0, 0, 0, 0, 0,
0, 85, 86, 123, 0, 79, 80, 0, 81, 0,
6, 0, 87, 0, 0, 0, 82, 83, 84, 0,
0, 0, 0, 0, 0, 0, 85, 86, 167, 0,
79, 80, 0, 81, 0, 6, 0, 87, 0, 0,
0, 82, 83, 84, 0, 0, 0, 0, 0, 0,
0, 85, 86, 176, 0, 79, 80, 0, 81, 0,
6, 0, 87, 0, 0, 0, 82, 83, 84, 0,
0, 0, 0, 0, 0, 0, 85, 86, 178, 0,
79, 80, 0, 81, 0, 6, 0, 87, 0, 0,
0, 82, 83, 84, 0, 0, 0, 0, 0, 0,
0, 85, 86, 180, 0, 79, 80, 0, 81, 0,
6, 0, 87, 0, 0, 0, 82, 83, 84, 0,
0, 0, 0, 0, 0, 0, 85, 86, 182, 0,
79, 80, 0, 81, 0, 6, 0, 87, 0, 0,
0, 82, 83, 84, 0, 0, 0, 0, 0, 0,
0, 85, 86, 205, 0, 79, 80, 0, 81, 0,
6, 0, 87, 0, 0, 0, 82, 83, 84, 79,
80, 0, 81, 0, 6, 0, 85, 86, 0, 0,
82, 83, 84, 0, 0, 0, 0, 87, 0, 0,
85, 86, 131, 132, 133, 134, 0, 0, 151, 0,
0, 87, 0, 0, 135, 0, 136, 137, 138, 139,
0, 140, 141, 142, 143, 131, 132, 133, 134, 0,
0, 153, 0, 0, 0, 0, 0, 135, 0, 136,
137, 138, 139, 0, 140, 141, 142, 143, 131, 132,
133, 134, 160, 0, 0, 0, 0, 0, 0, 0,
135, 0, 136, 137, 138, 139, 0, 140, 141, 142,
143, 131, 132, 133, 134, 169, 0, 0, 0, 0,
0, 0, 0, 135, 0, 136, 137, 138, 139, 0,
140, 141, 142, 143, 131, 132, 133, 134, 0, 197,
0, 0, 0, 0, 0, 0, 135, 0, 136, 137,
138, 139, 0, 140, 141, 142, 143, 131, 132, 133,
134, 0, 0, 0, 0, 0, 218, 0, 0, 135,
0, 136, 137, 138, 139, 0, 140, 141, 142, 143,
131, 132, 133, 134, 219, 0, 0, 0, 0, 0,
0, 0, 135, 0, 136, 137, 138, 139, 0, 140,
141, 142, 143, 131, 132, 133, 134, 0, 0, 0,
0, 0, 0, 0, 0, 135, 0, 136, 137, 138,
139, 0, 140, 141, 142, 143
};
static const short yycheck[] =
{
0, 25, 151, 82, 83, 84, 6, 1, 87, 158,
23, 1, 0, 37, 38, 39, 40, 23, 193, 24,
11, 45, 23, 47, 5, 1, 50, 3, 4, 5,
6, 22, 8, 10, 24, 23, 23, 23, 14, 15,
16, 42, 55, 26, 50, 220, 11, 1, 24, 25,
74, 5, 5, 53, 8, 41, 42, 22, 52, 35,
1, 85, 86, 52, 5, 54, 215, 216, 147, 148,
24, 1, 27, 9, 30, 5, 12, 226, 8, 5,
6, 24, 25, 0, 1, 27, 3, 4, 21, 6,
21, 8, 13, 14, 118, 119, 5, 14, 15, 16,
15, 16, 145, 146, 104, 11, 23, 24, 25, 11,
26, 23, 23, 113, 5, 113, 23, 117, 35, 27,
21, 53, 144, 23, 41, 42, 190, -1, -1, 1,
-1, 3, 4, 50, 6, 52, 8, 54, 55, 117,
-1, -1, 14, 15, 16, -1, 170, 171, -1, -1,
-1, 151, 24, 25, -1, 27, -1, -1, 158, -1,
-1, -1, -1, 35, 1, 189, 3, 4, 192, 6,
-1, 8, 196, -1, -1, -1, -1, 14, 15, 16,
-1, -1, -1, -1, 21, -1, -1, 24, 25, 1,
214, 3, 4, -1, 6, -1, 8, -1, 35, -1,
-1, -1, 14, 15, 16, -1, -1, -1, -1, 21,
-1, -1, 24, 25, -1, 215, 216, -1, -1, -1,
-1, -1, -1, 35, -1, 1, 226, 3, 4, 5,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
36, 37, 38, 39, 40, -1, -1, 43, 44, 45,
46, 47, 48, 49, 50, 51, -1, 53, -1, -1,
56, 57, 58, 59, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, -1, 24, 25, 26, 27, 28,
29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
39, 40, -1, -1, 43, 44, 45, 46, 47, 48,
49, -1, 51, -1, 53, -1, -1, 56, 57, 58,
59, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, -1, 24, 25, 26, 27, -1, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 1, -1,
3, 4, -1, 6, -1, 8, -1, -1, -1, -1,
-1, 14, 15, 16, -1, -1, -1, -1, -1, -1,
-1, 24, 25, 1, 27, 3, 4, -1, 6, -1,
8, -1, 35, -1, -1, -1, 14, 15, 16, -1,
-1, -1, -1, -1, -1, -1, 24, 25, 1, -1,
3, 4, -1, 6, -1, 8, -1, 35, -1, -1,
-1, 14, 15, 16, -1, -1, -1, -1, -1, -1,
-1, 24, 25, 1, -1, 3, 4, -1, 6, -1,
8, -1, 35, -1, -1, -1, 14, 15, 16, -1,
-1, -1, -1, -1, -1, -1, 24, 25, 1, -1,
3, 4, -1, 6, -1, 8, -1, 35, -1, -1,
-1, 14, 15, 16, -1, -1, -1, -1, -1, -1,
-1, 24, 25, 1, -1, 3, 4, -1, 6, -1,
8, -1, 35, -1, -1, -1, 14, 15, 16, -1,
-1, -1, -1, -1, -1, -1, 24, 25, 1, -1,
3, 4, -1, 6, -1, 8, -1, 35, -1, -1,
-1, 14, 15, 16, -1, -1, -1, -1, -1, -1,
-1, 24, 25, 1, -1, 3, 4, -1, 6, -1,
8, -1, 35, -1, -1, -1, 14, 15, 16, -1,
-1, -1, -1, -1, -1, -1, 24, 25, 1, -1,
3, 4, -1, 6, -1, 8, -1, 35, -1, -1,
-1, 14, 15, 16, -1, -1, -1, -1, -1, -1,
-1, 24, 25, 1, -1, 3, 4, -1, 6, -1,
8, -1, 35, -1, -1, -1, 14, 15, 16, 3,
4, -1, 6, -1, 8, -1, 24, 25, -1, -1,
14, 15, 16, -1, -1, -1, -1, 35, -1, -1,
24, 25, 17, 18, 19, 20, -1, -1, 23, -1,
-1, 35, -1, -1, 29, -1, 31, 32, 33, 34,
-1, 36, 37, 38, 39, 17, 18, 19, 20, -1,
-1, 23, -1, -1, -1, -1, -1, 29, -1, 31,
32, 33, 34, -1, 36, 37, 38, 39, 17, 18,
19, 20, 21, -1, -1, -1, -1, -1, -1, -1,
29, -1, 31, 32, 33, 34, -1, 36, 37, 38,
39, 17, 18, 19, 20, 21, -1, -1, -1, -1,
-1, -1, -1, 29, -1, 31, 32, 33, 34, -1,
36, 37, 38, 39, 17, 18, 19, 20, -1, 22,
-1, -1, -1, -1, -1, -1, 29, -1, 31, 32,
33, 34, -1, 36, 37, 38, 39, 17, 18, 19,
20, -1, -1, -1, -1, -1, 26, -1, -1, 29,
-1, 31, 32, 33, 34, -1, 36, 37, 38, 39,
17, 18, 19, 20, 21, -1, -1, -1, -1, -1,
-1, -1, 29, -1, 31, 32, 33, 34, -1, 36,
37, 38, 39, 17, 18, 19, 20, -1, -1, -1,
-1, -1, -1, -1, -1, 29, -1, 31, 32, 33,
34, -1, 36, 37, 38, 39
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const unsigned char yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
22, 24, 25, 26, 27, 28, 29, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 43, 44,
45, 46, 47, 48, 49, 51, 53, 56, 57, 58,
59, 61, 63, 64, 65, 66, 79, 80, 82, 85,
88, 90, 91, 92, 93, 95, 96, 97, 98, 99,
100, 101, 1, 5, 24, 66, 67, 76, 1, 3,
4, 6, 14, 15, 16, 24, 25, 35, 66, 69,
70, 71, 74, 75, 1, 69, 69, 69, 69, 5,
1, 5, 69, 1, 24, 89, 1, 69, 5, 6,
69, 0, 23, 62, 65, 66, 69, 10, 24, 25,
75, 75, 75, 1, 69, 1, 5, 69, 72, 73,
75, 17, 18, 19, 20, 29, 31, 32, 33, 34,
36, 37, 38, 39, 68, 13, 14, 9, 12, 15,
16, 23, 24, 23, 1, 66, 69, 94, 23, 63,
21, 1, 76, 1, 69, 77, 78, 1, 69, 21,
26, 11, 22, 11, 22, 70, 1, 71, 1, 71,
1, 75, 1, 75, 61, 5, 83, 84, 1, 52,
86, 87, 30, 27, 61, 21, 11, 22, 69, 69,
5, 41, 42, 21, 11, 1, 69, 54, 87, 69,
1, 94, 55, 69, 26, 23, 23, 5, 26, 21,
27, 69, 61, 1, 61, 81, 23, 94, 42, 50,
61, 21
};
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY -2
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrlab1
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yychar1 = YYTRANSLATE (yychar); \
YYPOPSTACK; \
goto yybackup; \
} \
else \
{ \
yyerror ("syntax error: cannot back up"); \
YYERROR; \
} \
while (0)
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Compute the default location (before the actions
are run). */
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
Current.first_line = Rhs[1].first_line; \
Current.first_column = Rhs[1].first_column; \
Current.last_line = Rhs[N].last_line; \
Current.last_column = Rhs[N].last_column;
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#define YYLEX yylex ()
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (0)
# define YYDSYMPRINT(Args) \
do { \
if (yydebug) \
yysymprint Args; \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
#if YYERROR_VERBOSE
# ifndef yystrlen
# if defined (__GLIBC__) && defined (_STRING_H)
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
static YYSIZE_T
# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
# else
yystrlen (yystr)
const char *yystr;
# endif
{
register const char *yys = yystr;
while (*yys++ != '\0')
continue;
return yys - yystr - 1;
}
# endif
# endif
# ifndef yystpcpy
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
static char *
# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
# else
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
# endif
{
register char *yyd = yydest;
register const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
#endif /* !YYERROR_VERBOSE */
#if YYDEBUG
/*-----------------------------.
| Print this symbol on YYOUT. |
`-----------------------------*/
static void
#if defined (__STDC__) || defined (__cplusplus)
yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue)
#else
yysymprint (yyout, yytype, yyvalue)
FILE* yyout;
int yytype;
YYSTYPE yyvalue;
#endif
{
/* Pacify ``unused variable'' warnings. */
(void) yyvalue;
if (yytype < YYNTOKENS)
{
YYFPRINTF (yyout, "token %s (", yytname[yytype]);
# ifdef YYPRINT
YYPRINT (yyout, yytoknum[yytype], yyvalue);
# endif
}
else
YYFPRINTF (yyout, "nterm %s (", yytname[yytype]);
switch (yytype)
{
default:
break;
}
YYFPRINTF (yyout, ")");
}
#endif /* YYDEBUG. */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void
#if defined (__STDC__) || defined (__cplusplus)
yydestruct (int yytype, YYSTYPE yyvalue)
#else
yydestruct (yytype, yyvalue)
int yytype;
YYSTYPE yyvalue;
#endif
{
/* Pacify ``unused variable'' warnings. */
(void) yyvalue;
switch (yytype)
{
default:
break;
}
}
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
It should actually point to an object.
Grammar actions can access the variable by casting it
to the proper pointer type. */
#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
# define YYPARSE_PARAM_DECL
# else
# define YYPARSE_PARAM_ARG YYPARSE_PARAM
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
# endif
#else /* !YYPARSE_PARAM */
# define YYPARSE_PARAM_ARG
# define YYPARSE_PARAM_DECL
#endif /* !YYPARSE_PARAM */
/* Prevent warning if -Wstrict-prototypes. */
#ifdef __GNUC__
# ifdef YYPARSE_PARAM
int yyparse (void *);
# else
int yyparse (void);
# endif
#endif
/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
/* Number of parse errors so far. */
int yynerrs;
int
yyparse (YYPARSE_PARAM_ARG)
YYPARSE_PARAM_DECL
{
register int yystate;
register int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Lookahead token as an internal (translated) token number. */
int yychar1 = 0;
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
short yyssa[YYINITDEPTH];
short *yyss = yyssa;
register short *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
register YYSTYPE *yyvsp;
#define YYPOPSTACK (yyvsp--, yyssp--)
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
/* When reducing, the number of symbols on the RHS of the reduced
rule. */
int yylen;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. so pushing a state here evens the stacks.
*/
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyssp >= yyss + yystacksize - 1)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
short *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow ("parser stack overflow",
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyoverflowlab;
# else
/* Extend the stack our own way. */
if (yystacksize >= YYMAXDEPTH)
goto yyoverflowlab;
yystacksize *= 2;
if (yystacksize > YYMAXDEPTH)
yystacksize = YYMAXDEPTH;
{
short *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyoverflowlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyssp >= yyss + yystacksize - 1)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. */
/* Read a lookahead token if we need one and don't already have one. */
/* yyresume: */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* yychar is either YYEMPTY or YYEOF
or a valid token in external form. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
/* Convert token to internal form (in yychar1) for indexing tables with. */
if (yychar <= 0) /* This means end of input. */
{
yychar1 = 0;
yychar = YYEOF; /* Don't call YYLEX any more. */
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yychar1 = YYTRANSLATE (yychar);
/* We have to keep this `#if YYDEBUG', since we use variables
which are defined only if `YYDEBUG' is set. */
YYDPRINTF ((stderr, "Next token is "));
YYDSYMPRINT ((stderr, yychar1, yylval));
YYDPRINTF ((stderr, "\n"));
}
/* If the proper action on seeing token YYCHAR1 is to reduce or to
detect an error, take that action. */
yyn += yychar1;
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yychar1)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
if (yyn == YYFINAL)
YYACCEPT;
/* Shift the lookahead token. */
YYDPRINTF ((stderr, "Shifting token %d (%s), ",
yychar, yytname[yychar1]));
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
*++yyvsp = yylval;
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
yystate = yyn;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
#if YYDEBUG
/* We have to keep this `#if YYDEBUG', since we use variables which
are defined only if `YYDEBUG' is set. */
if (yydebug)
{
int yyi;
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
yyn - 1, yyrline[yyn]);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyn]; yyrhs[yyi] >= 0; yyi++)
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
}
#endif
switch (yyn)
{
case 6:
#line 164 "tg.y"
{ close_line( yyvsp[0].s.line, yyvsp[0].s.end ); }
break;
case 7:
#line 167 "tg.y"
{
lt_set( line_table, yyvsp[0].l.line, yyvsp[0].l.cmd );
}
break;
case 8:
#line 170 "tg.y"
{
add_cmd( line_table, yyvsp[0].l.line, yyvsp[0].l.cmd );
}
break;
case 9:
#line 176 "tg.y"
{
yyval.l.line = yyvsp[0].s.line;
yyval.l.cmd = build_lcmd_c(0, yyvsp[0].s.start, yyvsp[0].s.end);
}
break;
case 10:
#line 180 "tg.y"
{
/* dump_expression( .val ); */
yyval.l.line = yyvsp[0].p.line;
yyval.l.cmd = build_lcmd_e(0, yyvsp[0].p.val, yyvsp[0].p.start,
yyvsp[0].p.end);
}
break;
case 11:
#line 186 "tg.y"
{
yyval.l.line = yyvsp[-1].l.line;
yyval.l.cmd = build_lcmd_c(yyvsp[-1].l.cmd,
yyvsp[0].s.start, yyvsp[0].s.end);
}
break;
case 12:
#line 191 "tg.y"
{
/* dump_expression( .val ); */
yyval.l.line = yyvsp[-1].l.line;
yyval.l.cmd = build_lcmd_e(yyvsp[-1].l.cmd, yyvsp[0].p.val, yyvsp[0].p.start, yyvsp[0].p.end);
}
break;
case 13:
#line 198 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 14:
#line 199 "tg.y"
{ yyval.s.line=yyvsp[0].f.line;yyval.s.start=yyvsp[0].f.start;yyval.s.end=yyvsp[0].f.end; }
break;
case 15:
#line 200 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 16:
#line 201 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 17:
#line 202 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 18:
#line 203 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 19:
#line 204 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 20:
#line 205 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 21:
#line 206 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 22:
#line 207 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 23:
#line 208 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 24:
#line 209 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 25:
#line 210 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 26:
#line 211 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 27:
#line 212 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 28:
#line 213 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 29:
#line 214 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 30:
#line 215 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 31:
#line 216 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 32:
#line 217 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 33:
#line 218 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 34:
#line 219 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 35:
#line 220 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 36:
#line 221 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 37:
#line 222 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 38:
#line 223 "tg.y"
{ yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 39:
#line 224 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 40:
#line 225 "tg.y"
{
yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 41:
#line 227 "tg.y"
{
yyval.s.line=yyvsp[0].i.line;yyval.s.start=yyvsp[0].i.start;yyval.s.end=yyvsp[0].i.end; }
break;
case 42:
#line 229 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 43:
#line 230 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 44:
#line 231 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 45:
#line 232 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 46:
#line 233 "tg.y"
{ yyval.s.line=yyvsp[0].s.line;yyval.s.start=yyvsp[0].s.start;yyval.s.end=yyvsp[0].s.end; }
break;
case 47:
#line 236 "tg.y"
{
yyval.p.line = yyvsp[-1].s.line;
yyval.p.start = yyvsp[-1].s.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_objexp( yyvsp[0].p.val );
}
break;
case 48:
#line 242 "tg.y"
{
yyval.p.line = yyvsp[-3].s.line;
yyval.p.start = yyvsp[-3].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = yyvsp[-1].p.val;
}
break;
case 49:
#line 248 "tg.y"
{ ERR(
"'(', '$' or object expected after '$'");
yyval.p.val = 0;
}
break;
case 50:
#line 254 "tg.y"
{
yyval.p.line = yyvsp[0].p.line;
yyval.p.start = yyvsp[0].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_object( 0, yyvsp[0].p.val );
}
break;
case 51:
#line 260 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_object(yyvsp[-2].p.val, yyvsp[0].p.val);
}
break;
case 52:
#line 266 "tg.y"
{
ERR("object expected after '.'");
yyval.p.val = 0;
}
break;
case 53:
#line 272 "tg.y"
{ yyval.i.val = 'e'; }
break;
case 54:
#line 273 "tg.y"
{ yyval.i.val = '='; }
break;
case 55:
#line 274 "tg.y"
{ yyval.i.val = '<'; }
break;
case 56:
#line 275 "tg.y"
{ yyval.i.val = '>'; }
break;
case 57:
#line 276 "tg.y"
{ yyval.i.val = '!'; }
break;
case 58:
#line 277 "tg.y"
{ yyval.i.val = 'l'; }
break;
case 59:
#line 278 "tg.y"
{ yyval.i.val = 'g'; }
break;
case 60:
#line 279 "tg.y"
{ yyval.i.val = '1'; }
break;
case 61:
#line 280 "tg.y"
{ yyval.i.val = '2'; }
break;
case 62:
#line 281 "tg.y"
{ yyval.i.val = '3'; }
break;
case 63:
#line 282 "tg.y"
{ yyval.i.val = '4'; }
break;
case 64:
#line 283 "tg.y"
{ yyval.i.val = '|'; }
break;
case 65:
#line 284 "tg.y"
{ yyval.i.val = '&'; }
break;
case 67:
#line 288 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp(yyvsp[-2].p.val, yyvsp[-1].i.val, yyvsp[0].p.val);
}
break;
case 69:
#line 297 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp(yyvsp[-2].p.val, '+', yyvsp[0].p.val);
}
break;
case 70:
#line 303 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp(yyvsp[-2].p.val, '-', yyvsp[0].p.val);
}
break;
case 71:
#line 309 "tg.y"
{
ERR("expression expected after '+'");
yyval.p.val = 0;
}
break;
case 72:
#line 313 "tg.y"
{
ERR("expression expected after '-'");
yyval.p.val = 0;
}
break;
case 74:
#line 320 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp(yyvsp[-2].p.val, '*', yyvsp[0].p.val);
}
break;
case 75:
#line 326 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp(yyvsp[-2].p.val, '/', yyvsp[0].p.val);
}
break;
case 76:
#line 332 "tg.y"
{ ERR("expression expected after '*'");
yyval.p.val = 0;
}
break;
case 77:
#line 335 "tg.y"
{ ERR("expression expected after '/'");
yyval.p.val = 0;
}
break;
case 78:
#line 340 "tg.y"
{ yyval.p.line = yyvsp[0].p.line;
yyval.p.start = yyvsp[0].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_explist( 0, yyvsp[0].p.val );
}
break;
case 79:
#line 345 "tg.y"
{ yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[-2].p.end;
yyval.p.val = new_explist(yyvsp[-2].p.val, yyvsp[0].p.val);
}
break;
case 80:
#line 352 "tg.y"
{ yyval.p.line = yyvsp[-2].s.line;
yyval.p.start = yyvsp[-2].s.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_fldlist( 0, yyvsp[-2].s.val,
yyvsp[0].p.val );
}
break;
case 81:
#line 358 "tg.y"
{
yyval.p.line = yyvsp[-4].p.line;
yyval.p.start = yyvsp[-4].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_fldlist( yyvsp[-4].p.val, yyvsp[-2].s.val,
yyvsp[0].p.val );
}
break;
case 82:
#line 367 "tg.y"
{
yyval.p.line = yyvsp[-2].s.line;
yyval.p.start = yyvsp[-2].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_array( yyvsp[-1].p.val );
}
break;
case 83:
#line 373 "tg.y"
{
yyval.p.line = yyvsp[-2].s.line;
yyval.p.start = yyvsp[-2].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_record( yyvsp[-1].p.val );
}
break;
case 84:
#line 379 "tg.y"
{ ERR("error in array definition");
yyval.p.val = 0;
yyval.p.line = yyvsp[-1].s.line;
}
break;
case 87:
#line 387 "tg.y"
{
yyval.p.line = yyvsp[-1].p.line;
yyval.p.start = yyvsp[-1].p.start;
yyval.p.end = yyvsp[0].i.end;
yyval.p.val = new_inc( yyvsp[-1].p.val, +1, 1 );
}
break;
case 88:
#line 393 "tg.y"
{
yyval.p.line = yyvsp[-1].i.line;
yyval.p.start = yyvsp[-1].i.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_inc( yyvsp[0].p.val, +1, 0 );
}
break;
case 89:
#line 399 "tg.y"
{
yyval.p.line = yyvsp[-1].i.line;
yyval.p.start = yyvsp[-1].i.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp( 0, 'n', yyvsp[0].p.val);
}
break;
case 90:
#line 405 "tg.y"
{
yyval.p.line = yyvsp[-1].s.line;
yyval.p.start = yyvsp[-1].s.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exp( 0, '-', yyvsp[0].p.val);
}
break;
case 91:
#line 411 "tg.y"
{
yyval.p.line = yyvsp[-1].p.line;
yyval.p.start = yyvsp[-1].p.start;
yyval.p.end = yyvsp[0].i.end;
yyval.p.val = new_inc( yyvsp[-1].p.val, -1, 1 );
}
break;
case 92:
#line 417 "tg.y"
{
yyval.p.line = yyvsp[-1].i.line;
yyval.p.start = yyvsp[-1].i.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_inc( yyvsp[0].p.val, -1, 0 );
}
break;
case 93:
#line 423 "tg.y"
{
yyval.p.line = yyvsp[0].i.line;
yyval.p.start = yyvsp[0].i.start;
yyval.p.end = yyvsp[0].i.end;
yyval.p.val = new_num(yyvsp[0].i.val);
}
break;
case 94:
#line 429 "tg.y"
{
yyval.p.line = yyvsp[0].f.line;
yyval.p.start = yyvsp[0].f.start;
yyval.p.end = yyvsp[0].f.end;
yyval.p.val = new_float(yyvsp[0].f.val);
}
break;
case 95:
#line 435 "tg.y"
{
yyval.p.line = yyvsp[0].s.line;
yyval.p.start = yyvsp[0].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_string(yyvsp[0].s.val);
if ( yyvsp[0].s.val ) {
FREE( yyvsp[0].s.val );
yyvsp[0].s.val = 0;
}
}
break;
case 96:
#line 445 "tg.y"
{
yyval.p.line = yyvsp[-2].s.line;
yyval.p.start = yyvsp[-2].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = yyvsp[-1].p.val;
}
break;
case 97:
#line 451 "tg.y"
{ ERR("expression expected after '('");
yyval.p.val = 0;
}
break;
case 98:
#line 456 "tg.y"
{
yyval.p.line = yyvsp[0].s.line;
yyval.p.start = yyvsp[0].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_part(yyvsp[0].s.val);
if ( yyvsp[0].s.val ) {
FREE( yyvsp[0].s.val );
yyvsp[0].s.val = 0;
}
}
break;
case 99:
#line 466 "tg.y"
{ yyval.p.line = yyvsp[0].p.line;
yyval.p.start = yyvsp[0].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_exppart( yyvsp[0].p.val );
}
break;
case 100:
#line 471 "tg.y"
{
yyval.p.line = yyvsp[-3].p.line;
yyval.p.start = yyvsp[-3].p.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_fun( yyvsp[-3].p.val, yyvsp[-1].p.val );
}
break;
case 101:
#line 477 "tg.y"
{
yyval.p.line = yyvsp[-3].p.line;
yyval.p.start = yyvsp[-3].p.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_tab( yyvsp[-3].p.val, yyvsp[-1].p.val );
}
break;
case 102:
#line 483 "tg.y"
{ ERR("bad function call argument");
yyval.p.val = 0;
}
break;
case 103:
#line 486 "tg.y"
{ ERR("expression expected after '['");
yyval.p.val = 0;
}
break;
case 104:
#line 492 "tg.y"
{ yyval.p.val = 0; }
break;
case 106:
#line 496 "tg.y"
{
yyval.p.line = yyvsp[0].p.line;
yyval.p.start = yyvsp[0].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_explist( 0, yyvsp[0].p.val );
}
break;
case 107:
#line 502 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.start = yyvsp[-2].p.start;
yyval.p.end = yyvsp[0].p.end;
yyval.p.val = new_explist(yyvsp[-2].p.val, yyvsp[0].p.val);
}
break;
case 123:
#line 525 "tg.y"
{ yyval.l.line = yyvsp[0].i.line;
yyval.l.cmd = 0; }
break;
case 124:
#line 527 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
ERR( "bad '@' command" );
yyval.l.cmd = 0;
}
break;
case 125:
#line 533 "tg.y"
{
yyval.l.line = yyvsp[-4].i.line;
yyval.l.cmd=new_if(yyvsp[-3].p.val,yyvsp[0].i.line,yyvsp[0].i.line);
}
break;
case 126:
#line 537 "tg.y"
{
yyval.l.line = yyvsp[-7].i.line;
yyval.l.cmd=new_if(yyvsp[-6].p.val,yyvsp[-3].i.line,yyvsp[0].i.line);
}
break;
case 127:
#line 541 "tg.y"
{ ERR( "@if command malformed" );
yyval.l.cmd = 0;
}
break;
case 128:
#line 546 "tg.y"
{ yyval.p.end = yyvsp[0].i.line; }
break;
case 129:
#line 547 "tg.y"
{ ERR("@function not closed");
yyval.p.val = 0; }
break;
case 130:
#line 552 "tg.y"
{
int _regres;
yyval.l.line = yyvsp[-6].i.line;
yyval.l.cmd = new_function( yyvsp[-5].s.val, yyvsp[-3].p.val,
yyvsp[0].p.end );
if ( regfun( yyvsp[-5].s.val, curfilen,
yyvsp[-6].i.line ) == 2 )
warning( "warning: function duplicated" );
if ( yyvsp[-5].s.val ) FREE( yyvsp[-5].s.val );
}
break;
case 131:
#line 562 "tg.y"
{
ERR("bad @function header");
yyval.l.cmd = 0;
}
break;
case 132:
#line 568 "tg.y"
{ yyval.p.val = 0; }
break;
case 134:
#line 572 "tg.y"
{ yyval.p.line = yyvsp[0].s.line;
yyval.p.val = new_parlist( 0, yyvsp[0].s.val );
if ( yyvsp[0].s.val ) FREE( yyvsp[0].s.val );
}
break;
case 135:
#line 576 "tg.y"
{
yyval.p.line = yyvsp[-2].p.line;
yyval.p.val = new_parlist( yyvsp[-2].p.val, yyvsp[0].s.val );
if ( yyvsp[0].s.val ) FREE( yyvsp[0].s.val );
}
break;
case 136:
#line 583 "tg.y"
{
yyval.l.line = yyvsp[-4].i.line;
yyval.l.cmd = new_switch(yyvsp[-3].p.val,yyvsp[-1].p.val,
yyvsp[-4].i.line,yyvsp[0].i.line);
}
break;
case 137:
#line 588 "tg.y"
{ ERR( "@case expected" );
yyval.l.cmd = 0;
}
break;
case 138:
#line 593 "tg.y"
{ yyval.p.line = yyvsp[0].p.line;
yyval.p.val = new_caselist(0,yyvsp[0].p.val,yyvsp[0].p.line);
}
break;
case 139:
#line 596 "tg.y"
{ yyval.p.line = yyvsp[-1].p.line;
yyval.p.val = new_caselist(yyvsp[-1].p.val,
yyvsp[0].p.val, yyvsp[0].p.line );
}
break;
case 140:
#line 602 "tg.y"
{
yyval.p.line = yyvsp[-3].p.line;
yyval.p.val = yyvsp[-3].p.val;
}
break;
case 141:
#line 606 "tg.y"
{ ERR("after @case expected expression and ':'");
yyval.p.val = 0;
}
break;
case 142:
#line 611 "tg.y"
{
yyval.l.line = yyvsp[-4].i.line;
yyval.l.cmd = new_for(yyvsp[-3].p.val, yyvsp[-4].i.line, yyvsp[0].i.line);
}
break;
case 143:
#line 615 "tg.y"
{ ERR( "bad @for command syntax" );
yyval.l.cmd = 0; yyval.l.line = yyvsp[-1].i.line;
}
break;
case 144:
#line 620 "tg.y"
{
yyval.p.line = yyvsp[-6].s.line;
yyval.p.val = new_forctl(yyvsp[-5].p.val,yyvsp[-3].p.val,yyvsp[-1].p.val);
}
break;
case 145:
#line 624 "tg.y"
{
yyval.p.line = yyvsp[-4].s.line;
yyval.p.start = yyvsp[-4].s.start;
yyval.p.end = yyvsp[0].s.end;
yyval.p.val = new_lforctl(yyvsp[-3].p.val,yyvsp[-1].p.val);
}
break;
case 146:
#line 630 "tg.y"
{ ERR( "bad @for command syntax" );
yyval.p.val = 0;
}
break;
case 147:
#line 635 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_return( yyvsp[0].p.val );
}
break;
case 148:
#line 638 "tg.y"
{ ERR( "@return without argument" );
yyval.l.cmd = 0;
}
break;
case 149:
#line 643 "tg.y"
{ yyval.l.line = yyvsp[0].i.line;
yyval.l.cmd = new_break( yyvsp[0].i.line );
}
break;
case 150:
#line 648 "tg.y"
{ yyval.l.line = yyvsp[0].i.line;
yyval.l.cmd = new_push();
}
break;
case 151:
#line 653 "tg.y"
{ yyval.l.line = yyvsp[0].i.line;
yyval.l.cmd = new_pop();
}
break;
case 152:
#line 658 "tg.y"
{ yyval.p.val = 0; }
break;
case 154:
#line 660 "tg.y"
{ ERR( "expression expected" );
yyval.p.val = 0;
}
break;
case 155:
#line 665 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_cmdexp( yyvsp[0].p.val ); }
break;
case 156:
#line 669 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_embed( yyvsp[0].p.val ); }
break;
case 157:
#line 673 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_emit( yyvsp[0].p.val ); }
break;
case 158:
#line 677 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_output( yyvsp[0].p.val ); }
break;
case 159:
#line 681 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_local( yyvsp[0].s.val ); }
break;
case 160:
#line 685 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_use( yyvsp[0].s.val ); }
break;
case 161:
#line 687 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_use( unquote(yyvsp[0].s.val) );
if (yyvsp[0].s.val) FREE(yyvsp[0].s.val);
}
break;
case 162:
#line 693 "tg.y"
{ yyval.l.line = yyvsp[0].i.line;
yyval.l.cmd = new_exit( 0 );
}
break;
case 163:
#line 696 "tg.y"
{ yyval.l.line = yyvsp[-1].i.line;
yyval.l.cmd = new_exit( yyvsp[0].p.val );
}
break;
}
/* Line 1016 of /usr/local/share/bison/yacc.c. */
#line 2418 "y.tab.c"
yyvsp -= yylen;
yyssp -= yylen;
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
*++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
#if YYERROR_VERBOSE
yyn = yypact[yystate];
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
char *yymsg;
int yyx, yycount;
yycount = 0;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
yysize += yystrlen (yytname[yyx]) + 15, yycount++;
yysize += yystrlen ("parse error, unexpected ") + 1;
yysize += yystrlen (yytname[yytype]);
yymsg = (char *) YYSTACK_ALLOC (yysize);
if (yymsg != 0)
{
char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
yyp = yystpcpy (yyp, yytname[yytype]);
if (yycount < 5)
{
yycount = 0;
for (yyx = yyn < 0 ? -yyn : 0;
yyx < (int) (sizeof (yytname) / sizeof (char *));
yyx++)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
const char *yyq = ! yycount ? ", expecting " : " or ";
yyp = yystpcpy (yyp, yyq);
yyp = yystpcpy (yyp, yytname[yyx]);
yycount++;
}
}
yyerror (yymsg);
YYSTACK_FREE (yymsg);
}
else
yyerror ("parse error; also virtual memory exhausted");
}
else
#endif /* YYERROR_VERBOSE */
yyerror ("parse error");
}
goto yyerrlab1;
/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action. |
`----------------------------------------------------*/
yyerrlab1:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
/* Return failure if at end of input. */
if (yychar == YYEOF)
{
/* Pop the error token. */
YYPOPSTACK;
/* Pop the rest of the stack. */
while (yyssp > yyss)
{
YYDPRINTF ((stderr, "Error: popping "));
YYDSYMPRINT ((stderr,
yystos[*yyssp],
*yyvsp));
YYDPRINTF ((stderr, "\n"));
yydestruct (yystos[*yyssp], *yyvsp);
YYPOPSTACK;
}
YYABORT;
}
YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
yychar, yytname[yychar1]));
yydestruct (yychar1, yylval);
yychar = YYEMPTY;
}
/* Else will try to reuse lookahead token after shifting the error
token. */
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (yyn != YYPACT_NINF)
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
YYDPRINTF ((stderr, "Error: popping "));
YYDSYMPRINT ((stderr,
yystos[*yyssp], *yyvsp));
YYDPRINTF ((stderr, "\n"));
yydestruct (yystos[yystate], *yyvsp);
yyvsp--;
yystate = *--yyssp;
#if YYDEBUG
if (yydebug)
{
short *yyssp1 = yyss - 1;
YYFPRINTF (stderr, "Error: state stack now");
while (yyssp1 != yyssp)
YYFPRINTF (stderr, " %d", *++yyssp1);
YYFPRINTF (stderr, "\n");
}
#endif
}
if (yyn == YYFINAL)
YYACCEPT;
YYDPRINTF ((stderr, "Shifting error token, "));
*++yyvsp = yylval;
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here. |
`----------------------------------------------*/
yyoverflowlab:
yyerror ("parser stack overflow");
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
return yyresult;
}
#line 158 "tg.y"